<!--<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="utf-8" />
    <title>Default Examples</title>
</head>
<body>
<form class="layui-form layui-form-pane" id="dataForm">
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">标题</label>
            <div class="layui-input-block" style="align-content: center">
                <input type="text" class="layui-input"  id="title" name="title" th:value="${news.title}" autocomplete="off" >
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">内容</label>
        <textarea id="content" name="content" style="width:80%;height:350px;">[[${news.content}]]</textarea>
    </div>
</form>

<style>
    form {
        margin: 0;
    }
    textarea {
        display: block;
    }
</style>
<link rel="stylesheet" href="/js/commons/kindeditor/themes/default/default.css" />
<script charset="utf-8" src="/js/commons/kindeditor/kindeditor-all.js"></script>
<script charset="utf-8" src="/js/commons/kindeditor/kindeditor-all-min.js"></script>
<link rel="stylesheet" href="/js/commons/layui/css/layui.css" media="all">
<link rel="stylesheet" href="/js/commons/zTree_v3/css/zTreeStyle/zTreeStyle.css" type="text/css">
<script charset="utf-8" src="/js/commons/kindeditor/lang/zh-cn.js"></script>
<script charset="utf-8" src="/js/commons/layui/layui.all.js" ></script>
<script charset="utf-8" src="/js/commons/jquery.js"></script>
<script charset="utf-8" src="/js/commons/common.js"></script>
<script type="text/javascript" src="/js/commons/zTree_v3/js/jquery.ztree.all.min.js"></script>
<script charset="utf-8" src="/js/mng/allInfo/allInfo_detail.js"></script>
<script th:inline="javascript">
    var editor;
    KindEditor.ready(function(K) {
        editor = K.create('textarea[name="content"]', {
            allowFileManager : true,
            afterCreate : function() {
                this.sync();
            },
            afterBlur:function(){
                this.sync();
            }
        });
    });
</script>
</body>
</html>-->


<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="utf-8" />
    <title>default examples</title>
    <style>
        form {
            margin: 0;
        }
        textarea {
            display: block;
        }
    </style>
    <link rel="stylesheet" href="/js/commons/kindeditor/themes/default/default.css" />
    <script charset="utf-8" src="/js/commons/kindeditor/kindeditor-all.js"></script>
    <script charset="utf-8" src="/js/commons/kindeditor/kindeditor-all-min.js"></script>
    <link rel="stylesheet" href="/js/commons/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/js/commons/zTree_v3/css/zTreeStyle/zTreeStyle.css" type="text/css">
    <script charset="utf-8" src="/js/commons/kindeditor/lang/zh-cn.js"></script>
    <script charset="utf-8" src="/js/mng/allInfo/allInfo_detail.js"></script>
    <link rel="stylesheet" href="/css/commons/base.css" media="all">
    <script th:inline="javascript">
        var editor;
        KindEditor.ready(function(K) {
            editor = K.create('textarea[name="content"]', {
                allowFileManager : true,
                afterCreate : function() {
                    this.sync();
                },
                afterBlur:function(){
                    this.sync();
                }
            });
        });
    </script>
</head>
<body>
<form class="layui-form layui-form-pane" id="dataForm" style="padding: 15px 15px 15px 15px">
    <input type="hidden" name="id" th:value="${news.id}">
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label required">标题</label>
            <div class="layui-input-inline" style="align-content: center">
                <input type="text" class="layui-input"  id="title" name="title" th:value="${news.title}" autocomplete="off" lay-verify="required">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label required">发布科室</label>
            <div class="layui-input-inline" style="align-content: center">
                <input type="hidden" class="layui-input" th:value="${news.dept.id}" id="pid" name="dept.id" autocomplete="off" lay-verify="required" readonly >
                <input type="text" class="layui-input" th:value="${news.dept.depName}" id="pname" name="dept.depName" autocomplete="off" >
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label required">信息类型</label>
            <div class="layui-input-inline">
                <select class="layui-select" id="conType" name="parentClassify.id"  lay-filter="conType" lay-verify="required">
                    <option th:each="c,index:${classify}" th:value="${c.id}" th:text="${c.claName}" th:selected="${c.id == news.parentClassify.id}"></option>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label required">信息小类</label>
            <div class="layui-input-inline">
                <select class="layui-select" id="search_res_type" name="childClassify.id"  lay-verify="required" >
                    <option th:each="c,index:${childClassify}" th:value="${c.id}" th:text="${c.claName}" th:selected="${c.id == news.childClassify.id}"></option>
                </select>
            </div>
        </div>
    </div>
    <div class="layui-form-item" pane="" style="width: 320px;">
        <label class="layui-form-label">内容类型</label>
        <div class="layui-input-block">
            <input type="radio" name="conType" value="0" title="自定义"  lay-filter="levelM" />
            <input type="radio" name="conType" value="1" title="本地上传" lay-filter="levelM" />
            <div class="layui-input-inline" id="ycc" style="display:none">
                <button type="button" class="layui-btn" id="ljsc"><i class="layui-icon"></i>立即上传</button>
                <input type="hidden"  id="filePath" name="filePath" >
                <input type="hidden"  id="fileName" name="fileName" >
                <input type="hidden"  id="fileSuffix" name="fileSuffix" >
            </div>
        </div>
    </div>
    <div class="layui-form-item layui-form-text" id="yc">
        <label class="layui-form-label">内容</label>
        <div class="layui-input-block">
            <textarea id="content" name="content" style="width: 100%; height:350px;">[[${news.content}]]</textarea>
        </div>
    </div>
    <div class="layui-form-item" style="display:none" id="show_file">
        <div class="layui-inline">
            <label class="layui-form-label">文件地址：</label>
            <div class="layui-input-block" >
                <input type="text" class="layui-input" id="fs" th:value="${news.filePath}" readonly style="
                height: 40px;
                line-height: 40px;
                background-color: #d2d2d2;
                padding: 0 10px;
                width: 300px;">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <span class="layui-form-label">有效期开始</span>
            <div class="layui-input-inline">
                <input type="text" id="beginDate" name="beginDate"  th:value="${news.beginDate}"   class="layui-input" />
            </div>
        </div>
        <div class="layui-inline">
            <span class="layui-form-label">有效期结束</span>
            <div class="layui-input-inline">
                <input type="text" id="endDate" name="endDate"  th:value="${news.endDate}"   autocomplete="off"  class="layui-input" />
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <div class="layui-input-inline">
                <button type="button" class="layui-btn" id="flie"><i class="layui-icon"></i>添加附件</button>
            </div>
        </div>
    </div>

    <div class="layui-form-item" >
        <div class="layui-inline">
         <a th:each="child:${news.attachmentList}" th:href="${child.filePath}">[[${child.fileName}]]</a>
       </div>
    </div>

    <div id="open_tree" style="display: none">
        <ul id="ztree" class="ztree"></ul>
    </div>
    <button type="button" class="layui-btn" lay-filter="submitBtn" style="display:none;" lay-submit="" id="submitBtn" name="submitBtn">保存</button>
</form>
<script charset="utf-8" src="/js/commons/layui/layui.all.js" ></script>
<script charset="utf-8" src="/js/commons/jquery.js"></script>
<script charset="utf-8" src="/js/commons/common.js"></script>
<script type="text/javascript" src="/js/commons/zTree_v3/js/jquery.ztree.all.min.js"></script>
<script charset="utf-8" src="/js/mng/myInfo/myInfo_edit.js"></script>

<style>
    .layui-form-radio {
        font-size: 10px;
    }
</style>
</body>
</html>

